package com.cn.wanxi.publisher.controller;

import com.cn.wanxi.publisher.domain.entity.User;
import com.cn.wanxi.publisher.domain.model.ResultModel;
import com.cn.wanxi.publisher.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName LoginController
 * @Description 负责处理登录逻辑相关的controller
 * @Author JiJiang
 * @Date 2022/9/28 19:11
 * @Version 1.0
 */

@RestController
public class LoginController {


    @Autowired
    private IUserService userService;

    @PostMapping("/register")
    public ResultModel register(@RequestBody User user) {

        return userService.addUser(user);
    }


}
